﻿using System.Net;

using SimbaRGVMonitor.Common.Utils;

namespace SimbaRGVMonitor.Controllers
{
    static class MonitorTcpAgentFactory
    {
        public static MonitorTcpAgent CreateSchedulerTcpAgent(string name)
        {
            var serverIp = ConfigurationUtil.GetAppSettingsIPValue("SchedulerServerHost");
            var serverPort = ConfigurationUtil.GetAppSettingsIntValue("SchedulerServerPort");
            var serverPoint = new IPEndPoint(serverIp, serverPort);
            return new MonitorTcpAgent(name, serverPoint);
        }
    }
}
